﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace pgnSoft.Veloz.ERP.Models.PageModels
{
    public class Style
    {
        private System.Web.Mvc.Controller controler;

        public Style()
        {
            this.Styles = new List<Style>(); 
        }

        public Style(System.Web.Mvc.Controller Controler)
        {
            this.controler = Controler;
            this.Styles = new List<Style>(); 
        }

        public Style(string FileName)
        {
            this.FileName = FileName;
        }
        public string FileName { get; set; }
        public List<Style> Styles { get; set; }

        [OutputCache(Duration = 3600, VaryByParam = "FileName")]
        public System.Web.IHtmlString Render(string FileName)
        {
            return System.Web.Optimization.Styles.Render(controler.Url.Action("Style", "Main", new { filename = FileName }));
        }

    }
}